<?php

//if ((0=='0')&&('0'==false)&&(false==null)&&(null=='')) { echo 'FFS...'; }

$timeparts = explode(" ",microtime());
$starttime = $timeparts[1].substr($timeparts[0],1);

/**
 * @author xxxxxx
 * @copyright 2008
 */

session_start();

require_once('../krumo/class.krumo.php');
//require_once('smarty/libs/Smarty.class.php');
//require_once("template_lite/src/class.template.php");

require_once('./functions/function.array_blend.php');

require_once('./functions/class.xarray.php');
require_once('./libraries/class.sessionmanager.php');
require_once('./libraries/class.modulemanager.php');
require_once('./libraries/class.module.php');
require_once('./libraries/class.eventhooks.php');

require_once('./modules/module.page.php');

function world($me, $id=0)
{
	echo ' '.$me->name.'<br />';
}

global $mm;
$mm = new moduleManager;

$mm->news->events->attach('print_something', 'world', array('$me', '1'), 'start');
$mm->news->events->attach('print_something', array('$me', 'hello'), null, 'start');
$mm->news->fire('print_something');


echo '<br /><br /><br />Mem alloc: '.round(memory_get_usage()/1024,3);
echo '<br />Mem peak: '.round(memory_get_peak_usage()/1024,3).'<br /><br />';

$timeparts = explode(" ",microtime());
$endtime = $timeparts[1].substr($timeparts[0],1);
echo bcsub($endtime,$starttime,6);
?>